Repository navigation
fix: record native Kafka and Service Bus send durations - #301
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Review of #301I read the diff and checked it against AGENTS.md. I found nothing that should block merge. I did not build the code or run the tests. Correctness
Native-first and performance
Tests and docs
Minor, non-blocking
|
|
Disposition of Claude's review of 14ef62c: both suggestions are non-blocking. Import ordering is cosmetic, so I left it unchanged. The repeated endpoint lookup is constant-time, preserves the explicit native-call boundary, and its cost is now stated in the PR; a signature refactor is unnecessary for this fix. Local native comparison then exposed allocations from the pooled async completion wrapper at batch concurrency. Commit The earlier CLEAR verdicts cover 14ef62c only. This new head needs fresh reviews and remains a draft. Sent-counter accounting found during validation is tracked separately in #302. |
|
@codex review |
ReviewI read the source changes in Kafka, Service Bus and
No actionable findings. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Both required reviewers have positive verdicts for The repeated Kafka endpoint lookup remains non-blocking: this constant-time lookup is already disclosed in the per-operation cost and covered by the native-comparison benchmarks. The earlier disposition still applies; no code change is needed. Before promotion, I rechecked all 933 files in |
9bf8b14 to
d092a17
Compare
|
Run 41511589444 completed successfully, so the previous CI wait ended. Main then added the Service Bus JSON benchmark in #300, creating an import conflict. I disabled auto-merge, restored the draft and rebased onto Head Validation on this head: Release solution build passed with 0 warnings/errors; 31 focused core/Service Bus tests passed, including the real emulator; all 10 Kafka duration tests passed, including real Kafka. Reviewed the combined diff for reuse, correctness and efficiency. No new performance measurements or throughput-budget claim. The 550-file source, log, report and binary archive is at Earlier approvals cover the previous head only. This head remains a draft and needs fresh Claude and Codex reviews before promotion. |
|
@codex review |
Review of #301: native send duration for Kafka and Service BusI read the full diff and checked the Kafka tombstone-batch drain path in Design. This follows the project rules.
Correctness.
Tests. Coverage is thorough. It includes success, failure and cancellation, split batches, outbox dispatch, no recording for empty or preparation failures, and zero-allocation checks. The benchmarks add a metrics on/off parameter. Non-blocking notes.
|
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Disposition of Claude's current-head review, for
Claude's CLEAR receipt and Codex's completed, finding-free summary both name this exact head. REST reviews, inline comments and GraphQL review threads are empty; all conversation comments were checked. There are three Claude review rounds and one force-push, below the rework limits. Before promotion, reverified the retained SHA-256 inventories: 550 files for this head and 933 historical files for The old wait on run 41511589444 ended successfully. No unresolved prerequisite or superseding PR was identified; #301 delivers and already closes #296. Proceeding through the protected promotion/auto-merge script on the approved head. |
|
The protected |
Kafka and Service Bus sends now record one
messaging.client.operation.durationmeasurement per actual native send call, including acknowledgement, native retries, failure and cancellation. Timing lives inside the adapter, so logical batching, pipeline tracing and outbox dispatch do not duplicate measurements; enqueue and preparation failures emit none.SendTracingendpoint recorder with an allocation-free native-operation timer. Disabled instruments avoid clock reads; concurrent Kafka tombstone sends also avoid a completion wrapper when disabled.error.type = "_OTHER", precomputed dimensions and the native Service Bus namespace. Document the boundary and extend native-comparison benchmarks with metrics enabled/disabled.Native-first review: this builds on Dekaf 1.25.0
ProduceAsync,ForTopic().ProduceAsync,ProduceAllAsyncand its existing acknowledgement/retry/instrumentation paths (source), and Azure.Messaging.ServiceBus 7.21.0SendMessageAsync,CreateMessageBatchAsync,TryAddMessageandSendMessagesAsync(source). It reuses Relayer'sRelayerInstrumentation,EndpointTelemetry.RecordDuration, batch grouping and send pools. Native metrics remain intact; the missing measurement is on Relayer's existing instrument. No new meter, span, retry, batching or acknowledgement implementation is introduced, and no decision exception is needed.Validation:
npm ciand the documentation production build pass on Node.js 24.14.1. The existing 22 low/moderate audit findings are unchanged and already recorded in Address documentation dependency audit vulnerabilities #101.dotnet build -c Releasepasses with 0 warnings/errors. Both native comparison suites completed 24 Dry and 24 Short cases. After refinement, an additional 8-case Kafka batch comparison ran with 64 invocations/iteration, 3 warmups and 3 measurements. The measured tombstone batch allocation fell from 342 to 51 B/message after replacing the pooled async wrapper with retained completion state; these broker figures include native/serializer allocations. The isolated retained completion test is 0 B at 128 concurrent operations. Wide ShortRun confidence intervals prevent a throughput-budget claim; these local numbers are diagnostic and the PR carriesperformancefor the advisory CI gate.Per native operation: one additional Kafka endpoint lookup and an instrument-enabled check, with two clock reads and one existing histogram record when enabled, 0 B from the timer. Concurrent Kafka tombstone completions use a retained
IValueTaskSourceonly when measurement is enabled, avoiding pooled async builder retention-cap allocations. Native synchronous admission failure behavior is preserved. The native-comparison benchmarks include native client and serializer allocations.Unrelated finding: filed #302 for the existing sent counter incrementing before validation/preparation and pre-counting unattempted batch tails. This PR fixes duration accounting only.
Evidence: raw reports, test logs, fixture/harness sources, repository inputs and loaded benchmark binaries are archived outside the removable worktree at
C:/git/Relayer-evidence/pr-301/9bf8b14b320247d5a98de26d1556cda84aaea442/.index.txtdistinguishes the initial and final measurements;sha256.jsonrecords the verified inventory. Binary/report copies were checked against their originals. Local retention lasts while this PR is open; repository cleanup may remove it after closure.Documentation: updated the telemetry guide and clarified the design record's native-call versus logical-span boundary.
Closes #296
Maintenance validation on
d092a17f1eb6eef3c4626f73eddfea4f7d5c4d60: rebased onto main34f00f7after #300, preserving its default JSON benchmarks and sharing the existing instrumentation instance so the Metrics parameter covers them. Release solution build passed with 0 warnings/errors; 31 focused core/Service Bus tests (including the real emulator) and 10 Kafka duration tests (including real Kafka) passed. Production per-message code is unchanged by this rebase; the extra singleton registration runs only during benchmark setup. No docs impact from this maintenance change.Current-head source, logs, reports and binaries are archived in
C:/git/Relayer-evidence/pr-301/d092a17f1eb6eef3c4626f73eddfea4f7d5c4d60/with a verified 550-file SHA-256 inventory. The 542 copied binary files match their worktree originals. Historical benchmark measurements above remain tied to9bf8b14and its separately reverified 933-file archive; no new throughput-budget claim is made. Both archives follow the retention policy stated above. The previous CI run 41511589444 passed, but this new head needs fresh draft reviews before promotion.